import { BrowserModule } from '@angular/platform-browser';
import { ErrorHandler, NgModule } from '@angular/core';
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
import { SplashScreen } from '@ionic-native/splash-screen';
import { StatusBar } from '@ionic-native/status-bar';

import { MyApp } from './app.component';
// import { HomePage } from '../pages/home/home';
// import { HomePageModule} from "../pages/home/home.module";
// import { ListvidoPage } from '../pages/listvido/listvido';
// import { ListvidoPageModule} from "../pages/listvido/listvido.module";
// import { WatchvideoPage } from '../pages/watchvideo/watchvideo';
// import { WatchvideoPageModule} from "../pages/watchvideo/watchvideo.module";
// import { PhonePage } from '../pages/phone/phone';
// import { PhonePageModule} from "../pages/phone/phone.module";
// import { MystatePage } from '../pages/mystate/mystate';
// import { MystatePageModule} from "../pages/mystate/mystate.module";
// import {VgCoreModule} from 'videogular2/core';
// import {VgControlsModule} from 'videogular2/controls';
// import {VgOverlayPlayModule} from 'videogular2/overlay-play';
// import {VgBufferingModule} from 'videogular2/buffering';

import {VideoListService} from "../service/http-service/getvideolist.service";
import {HttpClientModule} from "@angular/common/http";
import { BrowserInterceptor } from '../service/http-service/browser-interceptor';
import {GetVideoDetailService} from "../service/http-service/getVideoDetail.service";
// import {WeixinPage} from "../pages/weixin/weixin";
// import {WeixinPageModule} from "../pages/weixin/weixin.module";
import {ApplicantService} from "../service/http-service/applicant.service";
import {UsrLogin} from "../service/http-service/usrLogin.service";
import {PayService} from "../service/http-service/pay.service";
// import {MePage} from "../pages/me/me";
// import {MePageModule} from "../pages/me/me.module";
// import {PageproxyPage} from "../pages/pageproxy/pageproxy";
import { CommonHttpService} from "../service/http-service/common/common-http-service";
// import {PageproxyPageModule} from "../pages/pageproxy/pageproxy.module";
import { InAppBrowser } from '@ionic-native/in-app-browser';
import {PhoneService} from "../service/http-service/phone.service";
import {ValidateUtils} from "../util/validate-utils";
import {PostwatchednumService} from "../service/http-service/postwatchednum.service";


//import {TabHomePageModule} from '../pages/tab-home-page/tab-home-page.module';

@NgModule({
  declarations: [
    MyApp,

  ],
  imports: [

    // HomePageModule,
    // // ListvidoPageModule,
    // MystatePageModule,
    // // WeixinPageModule,
    // WatchvideoPageModule,
    // PhonePageModule,
    // MePageModule,
    // PageproxyPageModule,
    IonicModule.forRoot(MyApp,{ preloadModules: true}),
    // IonicModule.forRoot(MyApp, { preloadModules: true}, {
    //   links: [
    //   // { component: HomePage, name: 'Home', segment: 'home' },
    //   // { component: ListvidoPage, name: 'Listvido', segment: 'listvido/:Id' },
    //   { component: WatchvideoPage, name: 'Watchvideo', segment: 'watchvideo'},
    //   { component: MystatePage, name: 'Mystate', segment: 'mystate' },
    //   { component: PhonePage, name: 'Phone', segment: 'phone' },
    //   // { component: WeixinPage, name: 'Weixin', segment: 'weixin' },
    //   { component: PageproxyPage, name: 'Pageproxy', segment: 'pageproxy' },
    //   { component: MePage, name: 'Me', segment: 'me' },
    //   ]
    //   }),
    BrowserModule,
    // VgCoreModule,
    // VgControlsModule,
    // VgOverlayPlayModule,
    // VgBufferingModule,
    HttpClientModule
    //TabHomePageModule
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    // HomePage,
    // ListvidoPage,
    // WatchvideoPage,
    // MystatePage,
    // // WeixinPage,
    // PhonePage,
    // MePage,
    // PageproxyPage,
  ],
  providers: [
    StatusBar,
    BrowserInterceptor,
    UsrLogin,
    SplashScreen,
    VideoListService,
    GetVideoDetailService,
    InAppBrowser,
    CommonHttpService,
    ApplicantService,
    PhoneService,
    PayService,
    ValidateUtils,
    PostwatchednumService,
    {provide: ErrorHandler, useClass: IonicErrorHandler}
  ]
})
export class AppModule {}
